<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>个人信息</title>
    <link rel="stylesheet" href="../css/page-health-orderInfo.css" />
    <link rel="stylesheet" href="../plugins/elementui/index.css" />
    <script src="../plugins/jquery/dist/jquery.min.js"></script>
    <script src="../plugins/healthmobile.js"></script>
    <script src="../plugins/datapicker/datePicker.js"></script>
    <script src="../plugins/vue/vue.js"></script>
    <script src="../plugins/vue/axios-0.18.0.js"></script>
    <script src="../plugins/elementui/index.js"></script>
    <script>
        var id = getUrlParam("id");
    </script>
</head>
<body data-spy="scroll" data-target="#myNavbar" data-offset="150">
<div id="app" class="app">
    <!-- 页面头部 -->
    <div class="top-header">
        <span class="f-left"><i class="icon-back" onclick="history.go(-1)"></i></span>
        <span class="center">传智健康</span>
        <span class="f-right"><i class="icon-more"></i></span>
    </div>
    <!-- 页面内容 -->
    <div class="contentBox">
        <div class="text-link">
            <table cellpadding="10px" align="center">
                <tr>
                    <th>档案号</th>
                    <td id="fileNumber"></td>
                </tr>
                <tr>
                    <th>姓名</th>
                    <td id="name"></td>
                </tr>
                <tr>
                    <th>性别</th>
                    <td id="sex"></td>
                </tr>
                <tr>
                    <th>身份证号</th>
                    <td id="idCard"></td>
                </tr>
                <tr>
                    <th>手机号</th>
                    <td id="phoneNumber"></td>
                </tr>
                <tr>
                    <th>注册时间</th>
                    <td id="regTime"></td>
                </tr>
                <tr>
                    <th>登录密码</th>
                    <td id="password"></td>
                </tr>
                <tr>
                    <th>邮箱</th>
                    <td id="email"></td>
                </tr>
                <tr>
                    <th>出生日期</th>
                    <td id="birthday"></td>
                </tr>
                <tr>
                    <th>备注</th>
                    <td id="remark"></td>
                </tr>
                <tr>
                    <th>
                        <el-button type="primary" @click="tiao()">修改信息</el-button>
                        <el-button type="primary" @click="fanHui()">返回</el-button>
                    </th>
                </tr>
            </table>
        </div>
    </div>
</div>
</body>
<script>
    new Vue({
        el:"#app",
        data:{
            tableData: [{
                date: '2016-05-02',
                name: '王小虎',
                address: '上海市普陀区金沙江路 1518 弄'
            }]
        },
        //钩子函数
        created() {
            let never = document.cookie.indexOf("login_member_telephone=");
            if (never == -1) {
                window.location.href = "/pages/login.html"
            }
            this.findYou();
        },
        methods:{
            findYou(){
                axios.post("/member/queryMyMessage.do").then((res)=>{
                    if(res.data.flag){
                        document.getElementById("fileNumber").innerHTML = res.data.data.fileNumber;
                        document.getElementById("name").innerHTML = res.data.data.name;
                        document.getElementById("sex").innerHTML = res.data.data.sex;
                        document.getElementById("idCard").innerHTML = res.data.data.idCard;
                        document.getElementById("phoneNumber").innerHTML = res.data.data.phoneNumber;
                        document.getElementById("regTime").innerHTML = res.data.data.regTime;
                        document.getElementById("password").innerHTML = res.data.data.password;
                        document.getElementById("email").innerHTML = res.data.data.email;
                        document.getElementById("birthday").innerHTML = res.data.data.birthday;
                        document.getElementById("remark").innerHTML = res.data.data.remark;
                    }else {
                        this.$message.error(res.data.message);
                    }
                })
            },
            tiao(){
                window.location.href="/pages/updateMyMessage.html";
            },
            fanHui(){
                window.location="/pages/member.html";
            }
        }
    })
</script>
</html>